Method for defect management of an optical storage medium with a sorting process

ABSTRACT

A method for recording a plurality of data sets onto an optical storage medium by utilizing a temporary storage device in an optical storage system. The optical storage medium contains a plurality of data blocks and a plurality of spare data blocks. Each data block is utilized for recording a data set, and each spare data block is utilized for substituting for a defective data block to record the corresponding data set. The method comprises: storing a plurality of data sets corresponding to a plurality of defective data blocks in the memory into the temporary storage device; re-arranging a sequence of the plurality of data sets corresponding to the plurality of defective data blocks in the temporary storage device according to a sorting process; and recording the re-arranged data sets in the temporary storage device into the spare data blocks of the optical storage medium.

BACKGROUND OF INVENTION

[0001] 1. Field of the Invention

[0002] The present invention is generally related to a method forrecording a plurality of data sets onto an optical storage medium, andmore specifically, to a method by utilizing a temporary storage devicein an optical storage system to record a plurality of data sets that iscorresponding to a plurality of defective data blocks onto an opticalstorage medium according to a sorting process.

[0003] 2. Description of the Prior Art

[0004] Upon the arrival of the era for communications and multimedia,the demand for higher density and capacity of storage media incomputers, communication devices, and consumer electronics iscontinuously increasing. As data transmission increases, the need forhigh density, ultra compact, and cost-efficient storage media is ourfocus. Storage media such as an optical disc provides low cost yetportable and lightweight storage and has sufficient data capacity, whichhas become the preferred choice in the modern society as the mostpopular format for multimedia storage. Especially in the research anddevelopment in re-writable optical discs that allow users to input dataonto the optical disc according to personal preferences thereforeoptical disc has become the most significant form of multimedia storage.As a result, the method for producing high reliable and high efficientoptical discs for multimedia storage is the main focus of the industry.

[0005] An optical storage medium (e.g., an optical disc) is primarilyplaced in an optical storage system, such as an optical disk drive.Please refer to FIG. 1, which is a schematic block diagram of an opticaldisk drive 10 for accessing an optical disc 22 according to the priorart. The optical disk drive 10 comprises a loader 14, a motor 12utilized for rotating the loader, a pickup head 16 utilized foraccessing the data sets in the optical disc, a control circuitry 18utilized for controlling the operation of the optical disk drive 10, anda memory 20. The memory 20 utilized for temporarily storing the datasets necessary for the operation of the control circuitry 18 can be avolatile Dynamic Random Access Memory (DRAM) or other kinds of memorydevices. The optical disc 22 comprises a plurality of tracks 24 utilizedfor recording the data sets. When the optical disc 22 is placed on theloader 14, the motor 12 can drive the optical disc 22 to rotate. By therotation of the optical disc 22, the tracks 24 of the optical disc 22are swept by the pickup head 16, and the control circuitry 18 can accessthe data sets on the tracks 24 through the pickup head 16. The controlcircuitry 18 accesses the data sets of the optical disc 22 according tothe control of a host 26, and the host 26 can be a computer system of apersonal computer.

[0006] As we want to achieve the function of the optical disc 22 in FIG.1 for recording data sets more reliably and durably, certain defectmanagement mechanisms have already been set in optical disc standards.One of the general methods is to divide the optical disc 22 into severalparts and assign some of them to be spare record areas. When there aredefective areas of the optical disc 22 where they cannot be utilized forrecording data sets, the data sets that are originally to be recordedinto the defective areas will be recorded into the spare record areas.Hence, the data recording function of the optical disc 22 is notaffected by the defective areas. Please refer to FIG. 2, which is aschematic diagram of the configuration of a spare record area and ageneral record area conforming to a DVD (Digital Versatile Disk)+MRWstandard. In FIG. 1, each track 24 of the optical disc 22 utilized forrecording data sets is regarded to be divided into several large areas alead-in area LI, a data zone DZ, and a lead-out area LO, respectively.The lead-in area LI, the lead-out area LO are respectively utilized forindicating the beginning and the ending of the track 24, and the datazone DZ is utilized for recording data sets. In the lead-in area LI,there is a main table area (MTA) utilized for storing a defective tableDT. The data zone DZ is divided into a general application area GAA; asecondary table area STA for storing a backup of a defective table; auser data area UDA; and two spare areas SA1 and SA2. The user data areaUDA comprises a plurality of data blocks Bd. Each data block Bd isutilized for recording a data set, and the spare areas SA1 and SA2respectively comprise a plurality of spare data blocks Bs as well. Eachspare data block Bs is also utilized for recording a data set. Thecapacity of a data block Bd and the capacity of a spare data block Bsare identical. A data block Bd and a spare data block Bs canrespectively be a standard space for recording data sets.

[0007] Please proceed to refer to FIG. 1 and FIG. 2. When the opticaldisk drive 10 records a plurality of data sets transmitted from the host26 onto the optical disc 22, these data sets will be temporarily storedinto the memory 20 which are recorded into data blocks Bd of the track24. If a defective data block Bd being unable to be utilized forrecording a data set exists, it is necessary to find out a spare datablock Bs on the track 24 as a replacement, (a spare data block Bs in thespare area SA2 is usually utilized) and record the data set which issupposedly to be recorded into the defective data block Bd into thespare data block Bs as a replacement. Please refer to FIG. 3, which is aschematic diagram of a detailed embodiment of the memory 20 in FIG. 1.The memory 20 comprises a main storing section 27 and a spare storingsection 29. The main storing section 27 is utilized for storing aplurality of data sets transmitted from the above-mentioned host 26.After some data sets corresponding to the defective data blocks Bd areinspected, those data sets corresponding to the defective data blocks Bdwill be marked, sent to, and stored in the spare storing section 29, andfinally recorded into the spare data blocks Bs as replacements. Inactual operation, each spare data block Bs and each data block Bdrespectively have its own number such as a physical block number (PBN).For a clear description, it is defined in the present embodiment thateach data set corresponding to a defective data block Bd corresponds toa RPBN (replace PBN), and each original defective data block Bd alsocorresponds to a DPBN (defective PBN). The relationship between adefective data block Bd and a corresponding spare data block Bs utilizedfor substituting for the defective data block Bd is recorded into thedefective table DT of the above-mentioned optical disc 22, namely, eachrelationship between a corresponding RPBN and a DPBN is recorded intothe defective table DT. Please refer to FIG. 4, which is a schematicdiagram of an embodiment of a defect management mechanism according tothe prior art. FIG. 4 shows that there are five defective data blocksBd(1)-Bd(5) in the user data area UDA of the track 24 in FIG. 1, whereinthe data blocks Bd(1) and Bd(2) are the defective data blocks Bd thatare checked and marked during last operation. The data blocks Bd(1) andBd(2) correspond to DPBN(1), DPBN(2) and RPBN(1), RPBN(2), respectively.The data blocks Bd(3), Bd(4) and Bd(5) are the defective data blocks Bdthat are checked and marked during the present operation. The datablocks Bd(3), Bd(4) and Bd(5) correspond to DPBN(3), DPBN(4), DPBN(5)and RPBN(3), RPBN(4), RPBN(5), respectively.

[0008] The embodiment of FIG. 4 also shows the correspondingrelationship between a user data area UDA of the track 24 in FIG. 1 andthe memory 20. During the last operation, RPBN(1) and RPBN(2)corresponding to the defective data blocks Bd are checked and marked andhave two consecutive numbers. In the present embodiment, RPBN(1) andRPBN(2) are respectively set to 0X221200 and 0X221210. Please refer toFIG. 5 for the detailed description. The defective physical blocknumbers DPBNs and the replace physical block numbers RPBNs correspondingto the five defective data blocks Bd(1)-Bd(5) in FIG. 4 are arrangedaccording to the sequence after the check operation of the presentoperation is performed. FIG. 5 is a table according to an embodimentshowing the five defective data blocks in FIG. 4 according to thesequence stored in the spare storing section 29. During the presentoperation, RPBN(3), RPBN(4) and RPBN(5) that are assigned by thecorresponding and checked defective data blocks Bd are also threeconsecutive numbers 0X221220, 0X221230 and 0X221240, respectively. Asmentioned above, before the five data sets (respectively correspondingto the five defective data blocks Bd(1)-Bd(5)) are recorded into thespare data blocks Bs as replacements, (for example, the five spare datablocks Bs being replacements can be Bs(1)-Bs(5)), the five data setswill be sent to and temporarily stored in the spare storing section 29according to the sequence “Bd(3), Bd(1), Bd(4), Bd(2), Bd(5)” after thepresent operation. Finally the five data sets are recorded into thecorresponding spare data blocks Bs. According to the principles of theabove-mentioned operation, even if some segments of the optical disc 22in FIG. 1 are defective (for example, the defective segments are due toscratches or dusts), the defect management is accomplished by utilizingthe spare data blocks Bs to maintain the data recording function of theoptical disc 22.

[0009] In summary, please refer to FIG. 6 which is a flow chart of thedata recording function of the optical disc 22 according to the priorart. The function of the optical disc 22 for recording of data setsconforms to a DVD+MRW standard and comprises the above-mentioned defectmanagement to enhance the reliability of the data recording function ofthe optical disc 22. The process according to the prior art comprisesthe following steps:

[0010] Step 100: Start;

[0011] Step 102: The optical disk drive 10 receives an instruction forrecording data sets transmitted from the host 26 and it becomes ready torecord a plurality of data sets transmitted from the host 26 onto theoptical disc 22. Before the optical disk drive 10 records the data setsonto the optical disc 22, the data sets transmitted from the host 26will be first temporarily stored in the main storing section 27 of thememory 20;

[0012] Step 104: In the process of storing a data set transmitted fromthe host 26, the main storing section 27 of the memory 20 is determinedwhether it is full; if the main storing section 27 is full, the processof storing data sets into the main storing section 27 of the memory 20will be paused, and go to step 106;

[0013] Step 106: Check if any defective data blocks Bd exist in the datarecording process of the optical disc 22. If a defective data block Bdexists, go to step 108; if not, go to step 112;

[0014] Step 108: According to the prior art, once if defective datablocks Bd exist, the defective data blocks Bd will be marked, and thecorresponding data sets will be first sent to and stored in the sparestoring section 29 of the memory 20;

[0015] Step 110: Record the data sets that are temporarily stored in thespare storing section 29 of the memory 20 and are supposedly recordedinto the defective data blocks Bd into the spare data blocks Bs asreplacements. According to the defective table DT, the optical diskdrive 10 can find out the numbers of spare data blocks Bs correspondingto defective data blocks Bd, and make the pickup head 16 seek to thelocations of the spare data blocks Bs as replacements. The data setswill be recorded into the corresponding spare data blocks Bs of theoptical disc 22 to maintain the data recording function of the opticaldisc 22;

[0016] Step 112: Proceed to record the data sets normally, namely, torecord the data sets into the data block Bd assigned by the host 26. Ifthe process is from step 110 to the present step, which means that afterthe optical disk drive 10 moves the pickup head 16 in the step 110 torecord the data sets into the spare data blocks Bs, the optical diskdrive 10 moves the pickup head 16 again to the locations of thecorresponding data blocks Bd, and proceed to record the data sets;

[0017] Step 114: Determine if any new request of data recording isreceived. If yes, go back to step 102 and process the following datarecording; if not, go to step 116;

[0018] Step 116: End the operation of data recording, and finish theprocess according to the prior art.

[0019] Please refer back to FIG. 4. As mentioned above, the sequence ofthe five data sets in the spare storing section 29 of the memory 20 is“Bd(3), Bd(1), Bd(4), Bd(2), Bd(5)”. Please note that for the RPBNs, atthis point, the sequence of the five data sets in the above-mentionedspare storing section 29 is composed of five inconsecutive numbers.Please refer back to FIG. 5. In the embodiment according to the priorart, the discontinuity of the five RPBNs corresponding to the five datasets is emphasized. As mentioned in step 110 in FIG. 6, when thedefective data blocks Bd have been found resulting in the data sets thatare temporarily stored in the spare storing section 29 being recordedinto the spare data blocks Bs as replacements, the pickup head 16 mustseek tracks until the corresponding locations of the spare data blocksBs are reached for recording the data sets into the spare data blocks Bsinstead of the defective data blocks Bd. However, during a seekingprocess, the pickup head 16 can only record the data sets into aplurality of adjacent spare data blocks Bs, and these adjacent sparedata blocks Bs correspond to the consecutive RPBNs. In other words, ifthe sequence of data recording corresponds to the inconsecutive RPBNs,the pickup head 16 must separately record a plurality of data sets intothe corresponding spare data blocks Bs in different seeking processes.Please refer back to the embodiment in FIG. 4, because the sequence ofthe five data sets (“Bd(3), Bd(1), Bd(4), Bd(2), Bd(5)”) in the sparestoring section 29 is composed of five inconsecutive RPBNs, such thatthe pickup head 16 must separately record the five data sets into thecorresponding spare data blocks Bs in five different seeking processesand not at all by the same seeking process.

[0020] Please refer back to the optical disc standard in FIG. 2. Theareas occupied by each spare data block Bs in the optical disc 22 (suchas the spare areas SA1 and SA2) and the areas occupied by the datablocks Bd (a user data area UDA) are alternatively interlaced onto thetrack 24. Hence, the pickup head 16 may move from the original numbercorresponding to a data block Bd to the number corresponding to thespare data block Bs in each seeking process. It is necessary to proceedthe long-distance and crossing-track move, in which the time-consumptionduring the seeking process is inevitable. If the amount of data setshaving inconsecutive RPBNs is increased, the efficiency of datarecording function of the optical disc 22 is rapidly reduced due to thefrequent seeking processes according to the prior art. The operationalburden of the actuating mechanisms of the pickup head 16 in FIG. 1 isalso increased, causing it to wear out easily. Moreover, in theabove-mentioned embodiment, the data sets are first sent to the sparestoring section 29 for storage, and are recorded into the spare datablocks Bs by one seeking process or several seeking processes. Thedesign mentioned above limits the amount of data sets corresponding tothe defective data blocks Bd, which can be processed during each seekingprocess, to the capacity of the spare storing section 29 of the memory20. Usually for the design of the memory 20, the capacity of the mainstoring section 27 is far greater than the capacity of the spare storingsection 29. If the amount of defective data blocks Bd checked is greaterthan the capacity of the spare storing section 29 during a recordingoperation, it is inevitable that the recording operation has to beaccomplished by several operations to reduce the efficiency of the datarecording process of the optical disc. Please note that theabove-mentioned embodiments from FIG. 2 to FIG. 6 are the operatingconditions according to the DVD (Digital Versatile Disk)+MRW standard.If the related configuration and the recording operation is almost thesame as those mentioned above according to different optical discstandards such as a CD-MRW (Compact Disk-Mount Rainier reWritable)standard, namely, the speed of recording data sets may be limited to thecapacity of the spare storing section 29 or too many seeking processes.

SUMMARY OF INVENTION

[0021] It is therefore a primary objective of the claimed invention toprovide a method for recording a plurality of data sets onto an opticalstorage medium after re-arranging the data sets according to a sortingprocess in an optical storage system. The purpose is to reduce theseeking processes in order to solve the above-mentioned problems.

[0022] In the method and structure disclosed in the claimed invention, atemporary storage device is utilized to store a plurality of data setscorresponding to the defective data blocks in the main storing section.Then the data sets stored in the temporary storage device arere-arranged according to a sorting process, such that before the datasets are recorded into the spare storing section of the memory and thespare data blocks of the optical disc, the sequence of the RPBNscorresponding to the data sets is optimized. Moreover, the main storingsection and the spare storing section of the claimed invention arerespectively a ring buffer memory. To co-operate with the installationof the temporary storage device and the utilization of the sortingprocess, the seeking processes necessary for the defect management ofthe optical disc are reduced rapidly, and the amount of defective datablocks which can be processed during a seeking process is not limited tothe capacity of the spare storing section.

[0023] The objective of the claimed invention is to provide a method forrecording a plurality of data sets onto an optical storage medium byutilizing a temporary storage device in an optical storage system. Theoptical storage system further comprises a memory for storing theplurality of data sets. The optical storage medium comprises a pluralityof data blocks and a plurality of spare data blocks. Each data block isutilized for recording a data set, and each spare data block is areplacement for a defective data block to record the data setcorresponding to the defective data block. The method comprises thefollowing steps: storing a plurality of data sets corresponding to aplurality of defective data blocks in the memory into the temporarystorage device; re-arranging a sequence of the plurality of data setscorresponding to the plurality of defective data blocks in the temporarystorage device according to a sorting process; and recording theplurality of re-arranged data sets in the temporary storage device intothe plurality of spare data blocks of the optical storage medium.

[0024] Another objective of the claimed invention is to provide a methodfor recording a plurality of data sets onto an optical storage medium inan optical storage system to reduce seeking processes. The opticalstorage medium comprises a plurality of data blocks and a plurality ofspare data blocks. Each data block is utilized for recording a data set,and each spare data block is a replacement for a defective data block torecord the data set corresponding to the defective data block. Theoptical storage system comprises a memory which comprises a main storingsection, a spare storing section, and a temporary storage deviceelectrically coupled to the memory to temporarily store the data sets.The method comprises the following steps: utilizing the main storingsection to temporarily store the data sets; recording a predeterminednumber of data sets corresponding to the predetermined number ofdefective data blocks in the main storing section into the temporarystorage device, wherein the predetermined number depends on the capacityof the memory of the main storing section; re-arranging a sequence ofthe predetermined number of data sets in the temporary storage deviceaccording to a sorting process; recording the predetermined number ofthe re-arranged data sets in the temporary storage device into the sparestoring section; and recording the predetermined number of there-arranged data sets in the spare storing section into thepredetermined number of the corresponding spare data blocks in anoptical storage medium.

[0025] Another objective of the claimed invention is to provide a methodfor recording a plurality of data sets into a plurality of adjacentspare data blocks in an optical storage medium during a seeking process.Each data set corresponds to a spare data block number, and each sparedata block number corresponds to a spare data block. The methodcomprises (a) re-arranging the plurality of data sets according to thesequence of the plurality of corresponding spare data block numbers,such that the plurality of spare data block numbers corresponding to theplurality of re-arranged data sets is consecutive spare data blocknumbers; and (b) after performing step (a), recording the plurality ofre-arranged data sets into the plurality of adjacent spare data blocksduring a seeking process.

[0026] These and other objectives of the claimed invention will no doubtbecome obvious to those of ordinary skill in the art after reading thefollowing detailed description of the preferred embodiment, which isillustrated in the various figures and drawings.

BRIEF DESCRIPTION OF DRAWINGS

[0027]FIG. 1 is a schematic block diagram of an optical disk drive foraccessing an optical disc according to the prior art.

[0028]FIG. 2 is a schematic diagram of the configuration of a sparerecord area and a general record area conforming to a DVD(DigitalVersatile Disk)+MRW standard.

[0029]FIG. 3 is a schematic diagram of a detailed embodiment of a memoryin FIG. 1.

[0030]FIG. 4 is a schematic diagram of an embodiment of a defectmanagement mechanism according to the prior art.

[0031]FIG. 5 is a table according to an embodiment showing the fivedefective data blocks in FIG. 4 according to the sequence stored in thespare storing section.

[0032]FIG. 6 is a flowchart of the data recording function of an opticaldisc according to the prior art.

[0033]FIG. 7 is a schematic block diagram of an optical disk drive foraccessing an optical disc according to the present invention.

[0034]FIG. 8 is a schematic diagram of a detailed embodiment of a memoryin FIG. 7.

[0035]FIG. 9 is a schematic diagram of an embodiment of a defectmanagement mechanism of an optical disc according to the presentinvention.

[0036]FIG. 10 is a table showing a sequence of the five defective datablocks in FIG. 9 after the sorting process of the present invention.

[0037]FIG. 11 is a flowchart of the data recording function of anoptical disc according to an embodiment of the present invention.

[0038]FIG. 12 is a flowchart of the data recording function of anoptical disc according to another embodiment of the present invention.

DETAILED DESCRIPTION

[0039] The disclosed method and structure in the present invention,taking a standard of DVD+MRW in FIG. 2 for example, are based on anexisted standard arrangement of spare record areas and general recordareas to propose a new method of defect management of data sets toenhance the efficiency of the data recording function of the opticaldisc. The above-mentioned optical disc can be an optical disc such as aCD-MRW (Compact Disk-Mount Rainier ReWritable) standard, DVD (DigitalVersatile Disk)+MRW standard, or other kinds of optical storage mediafor rewriting data sets. Please refer to FIG. 7, which is a schematicblock diagram of an optical disk drive 30 for accessing an optical disc42 according to the present invention. The major difference is that atemporary storage device 43 is added in the present embodiment. Byutilizing the present invention, users can control the optical diskdrive 30 for accessing the data sets of the optical disc 42 through thehost 46 (such as the computer system of a personal computer). Withreference to the embodiment shown in FIG. 1 according to the prior art,the optical disk drive 30 in the present embodiment comprises a loader34, a motor 32 utilized for rotating the loader, a pickup head 36utilized for accessing the data sets of the optical disc 22, a controlcircuitry 38 utilized for controlling the operation of the optical diskdrive 30, and a memory 40. The temporary storage device 43 and thememory 40 respectively can be a volatile dynamic random access memory(DRAM) or other kinds of memory devices for storing the data sets in theoperation of the control circuitry 38. The optical disc 42 comprises aplurality of the tracks 44 utilized for recording data sets. The controlcircuitry 38 accesses the data sets on the track 44 through the pickuphead 36. Please refer back to FIG. 2 for the configuration of the sparerecord areas and the general record areas on the track 44. In anotherembodiment in the present invention, a data block is marked with a tagBnd, and a spare data block is marked with a tag Bns.

[0040] Please refer to FIG. 8 for the configuration of theabove-mentioned memory 40. FIG. 8 is a schematic diagram of a detailedembodiment of the memory 40 in FIG. 7. The memory 40 is divided into amain storing section 47 and a spare storing section 49. Please referback to the embodiment in FIG. 3. The functions of the main storingsection 47 and those of the spare storing section 49 of the memory 40 inthe embodiment in FIG. 8 are similar to those in the embodiment in FIG.3 so detailed descriptions are therefore omitted. A plurality of datasets transmitted from the above-mentioned host 46 are stored into themain storing section 47. After some data sets corresponding to thedefective data blocks Bnd are checked, the data sets corresponding tothe defective data blocks Bnd will be marked and sent to the sparestoring section 49 to be stored in, and then recorded into the sparedata blocks Bns as replacements. According to the prior art, a largenumber of seeking processes are inevitable when recording the data setsinto the spare data blocks Bns as replacements, because the data setsstored in the spare storing section 49 of the memory 40 haveinconsecutive RPBNs. However, a large number of seeking processes willreduce the efficiency of recording data sets. By utilizing thenewly-added temporary storage device 43 in FIG. 7 and the sortingprocess according to the present invention, the data sets which will berecorded into the spare data blocks Bns are re-arranged to achieve themajor purpose of the present invention. Please refer to FIG. 9, which isa schematic diagram of an embodiment of a defect management mechanism ofthe optical disc 42 according to the present invention. For a clearcomparison, we continue using the embodiments shown in FIG. 4 and FIG. 5as examples. FIG. 9 shows that there are five defective data blocksBnd(1)-Bnd(5) in a user data area UDA of the track 44 in FIG. 7, whereinthe data block Bnd(1) and Bnd(2) are the defective data blocks Bnd thatare checked and marked in the last operation. Please note that each dataset corresponding to a defective data block Bnd corresponds to a RPBN,and each original defective data block Bnd has a corresponding DPBN. Therelationship between a defective data block Bnd and a spare data blockBns utilized for substituting a corresponding defective data block Bndis recorded in a defective table DT of the optical disc 42 (not shown inFIG. 7), namely, the defective table DT records each relationshipbetween a RPBN and a DPBN. The data blocks Bnd(1) and Bnd(2) correspondto DPBN(1), DPBN(2) and RPBN(1), RPBN(2) respectively. The remainingdefective data blocks Bnd(3), Bnd(4) and Bnd(5) that are checked andmarked in the present operation correspond to the DPBN(3), DPBN(4),DPBN(5), and RPBN(3), RPBN(4), RPBN(5) respectively.

[0041] The embodiment in FIG. 9 shows the relationship between a userdata area UDA of the track 44, the temporary storage device 43 and thememory 40. One of the characters of the present invention is that beforerecording the data sets corresponding to the defective data blocks Bndin the main storing section 47 into the spare storing section 49, thedata sets are first temporarily recorded into the temporary storagedevice 43. As shown in FIG. 9, the five data sets will be sent to andtemporarily stored in the temporary storage device 43 according to thesequence after the present operation “Bnd(3), Bnd(1), Bnd(4), Bnd(2),Bnd(5)” is performed. Afterwards, in the present embodiment, the fivedata sets in the temporary storage device 43 will be re-arrangedaccording to a sequence of RPBNs and the above-mentioned sortingprocess, such that the sequence of the re-arranged data sets after thesorting process is the optimized sequence of the RPBNs corresponding tothe re-arranged data sets. The sequence of the five data sets originallystored in the temporary storage device 43 is “Bnd(3), Bnd(1), Bnd(4),Bnd(2), Bnd(5)”. After the sorting process, the sequence of the fivedata sets originally stored the temporary storage device 43 becomes“Bnd(1), Bnd(2), Bnd(3), Bnd(4), Bnd(5)”. Please refer to FIG. 10, whichis a table showing the sequence of the five defective data blocksBnd(1)-Bnd(5) in FIG. 9 after the sorting process. The table showing thesequence after the sorting process also demonstrates the detailedembodiment of the DPBNs and the RPBNs corresponding to the five datasets. FIG. 10 adopts the detailed data of RPBN(1)-RPBN(5) in FIG. 5 andthe detailed data of the DPBN(1)-DPBN(5). The temporary storage indices(one index represents a number of a data set stored in the main storingsection 47 of the memory 40) are also added in FIG. 10.

[0042]FIG. 10 clearly shows that the sequence of the five data sets“Bnd(1), Bnd(2), Bnd(3), Bnd(4), Bnd(5)” stored in the temporary storagedevice 43, such that the five RPBNs corresponding to the five data setsare five consecutive RPBNs, namely, when finally recording the five datasets into the corresponding spare data blocks Bns of the optical disc 42as replacements, the five data sets will be recorded into the fiveadjacent spare data blocks Bns of the optical disc 42. Afterwards, thefive re-arranged data sets will be sent to and temporarily stored in thespare storing section 49 of the memory according to the sequence, andwill be finally recorded into the corresponding spare data blocks Bns ofthe optical disc 42 to accomplish the defect management mechanism of theoptical disc 42. Please refer to FIG. 11. FIG. 11 is a flowchart of thedata recording function of the optical disc 42 according to anembodiment of the present invention. The flow chart comprises thefollowing steps:

[0043] Step 200: Start;

[0044] Step 202: The optical disk drive 30 receives an instruction forrecording data sets transmitted from the host 46 and it becomes ready torecord a plurality of data sets transmitted from the host 46 onto theoptical disc 42. Before the optical disk drive 30 records the data setsonto the optical disc 42, the data sets transmitted from the host 46will be first temporarily stored in the main storing section 47 of thememory 40;

[0045] Step 204: In the process of storing data sets transmitted fromthe host 46, the main storing section 47 of the memory 40 is determinedwhether it is full; if the main storing section 47 is full, the processof storing data sets into the main storing section 47 of the memory 40will be paused, and go to step 206;

[0046] Step 206: Check if any defective data blocks Bnd exist in thedata recording process of the optical disc 42. If a defective data blockBnd exists, go to step 208; if not, go to step 216;

[0047] Step 208: According to the present invention, the defective datablocks Bnd will be marked, and the corresponding data sets will be firstsent to and stored in the temporary storage device 43. At the same time,determine if the temporary storage device 43 is full; if the amount ofdata sets corresponding to the defective data blocks Bnd does not exceedthe capacity of the temporary storage device 43, go to step 210; if thetemporary storage device 43 is full during the transmission of datasets, the process of recording data sets onto the temporary storagedevice 43 will be paused and go to step 210;

[0048] Step 210: The sequence of data sets stored in the temporarystorage device 43 will be re-arranged according to the sequence of theRPBNs, namely, by the operation of the above-mentioned sorting processaccording to the present invention to re-arrange the sequence of thedata sets, such that the sequence of the re-arranged data sets after thesorting process is the optimized continuity of the RPBNs correspondingto the data sets. As shown in the embodiments in FIG. 9 and FIG. 10, thefive RPBNs corresponding to the five re-arranged data sets are fiveconsecutive RPBNs;

[0049] Step 212: Record the re-arranged data sets stored in thetemporary storage device 43 into the spare storing section 49 of thememory 40 after the sorting process;

[0050] Step 214: Record the data sets stored in the spare storingsection 49 of the memory 40 (after the sorting process) into the sparedata blocks Bns as replacements. According to the defective table DT,the optical disk drive 30 can find out the numbers of spare data blocksBns corresponding to defective data blocks Bnd, and make the pickup head36 seek to the locations of the spare data blocks Bns as replacements.At each seeking process, a plurality of data sets having consecutiveRPBNs can be recorded into the corresponding and adjacent spare datablocks Bns of the optical disc 42;

[0051] Step 216: Proceed to record data sets normally, namely, to recordthe data sets into the data blocks Bnd assigned by the host 46. If theprocess is from step 214 to the present step, which means that after theoptical disk drive 30 moves the pickup head 36 in the step 214 to recordthe data sets into the spare data blocks Bns, the optical disk drive 30moves the pickup head 36 again to the locations of the correspondingdata blocks Bnd, and proceed to record the data sets;

[0052] Step 218: Determine if any new request of data recording isreceived. If yes, go back to step 202 and process the following datarecording; if not, go to step 220;

[0053] Step 220: End the operation of data recording, and finish theprocess according to the embodiment.

[0054] It is to be noted that the main storing section 47 of the memorycan be a ring buffer memory. At step 204, the method for determiningwhether the main storing section 47 of the memory 40 is full isdescribed below: during the checking process, the first checkeddefective data block Bnd is marked with a “Write-done Point” tag. If thedata sets transmitted from the host 46 start to occupy the marked areawith a “Write-done Point” tag in the main storing section 47 of thememory 40, the main storing section 47 is full and storing data setsinto the main storing section 47 of the memory 40 is paused.

[0055] Moreover, during a seeking process, the pickup head 36 can onlyrecord the data sets into the plurality of adjacent spare data blocksBns, and these adjacent spare data blocks Bns correspond to theconsecutive RPBNs. Hence, in the above-mentioned step 210, because thesequence of the data sets after the sorting process has the optimizedcontinuity of the RPBNs corresponding to the data sets, during eachseeking process in the following step 214 (after the sorting process inthe above-mentioned step 210), the “maximum” number of data setscorresponding to the consecutive RPBNs can be recorded into thecorresponding and adjacent spare data blocks Bns of the optical disc 42without proceeding with a new seeking operation according to the priorart. According to the prior art, because the continuity of the RPBNs isnot processed, such that if there are in-consecutive RPBNs, a newseeking operation is necessary. Hence, the burden of the pickup head 36is increased and the efficiency is reduced. In fact, if go back to checkstep 210, after the optimization of continuity of the RPBNs, the RPBNscorresponding to the data sets stored in the temporary storage device 43still cannot be ensured to be consecutive, wherein one reason is thatparts of the spare data block Bns of the optical disc 42 are alsodefective. Hence, in the flow chart of the present embodiment, step 213can be added between step 212 and step 214. Please refer to FIG. 12,which is a flowchart according to FIG. 11 with a newly-added step. Thenewly-added step 213 is:

[0056] Step 213: Sequentially check if the RPBNs corresponding to thedata sets stored in the temporary storage device 43 are consecutive, andcalculate the number of the consecutive RPBNs. If sequentially-checkedRPBNs have consecutive numbers, go to step 212 to record the data setsstored in the temporary storage device 43 corresponding to theconsecutive RPBNs into the spare storing section 49 of the memory 40; ifan inconsecutive RPBN is found, go to step 214 to record the data setsstored in the spare storing section 49 of the memory 40 corresponding tothe consecutive RPBNs into the spare data blocks Bns of the optical disc42 as replacements during a seeking process.

[0057] Please note that in step 213, if the sequentially-checked RPBNsare consecutive numbers, each data set in the temporary storage device43 will be sequentially recorded into the spare storing section 49 ofthe memory 40. Because each data set sequentially recorded into thespare storing section 49 of the memory 40 has a consecutive RPBN, theyalso can be sequentially recorded into the corresponding and adjacentspare data blocks Bns of the optical disc 42 during a seeking processwhen they are simultaneously stored in the spare storing section 49.According to the above-mentioned operation, the spare storing section 49can be implemented with a ring buffer memory to make use of the sparestoring section 49 repeatedly, such that the amount of data setscorresponding to the defective data blocks Bnd that can be processedduring each seeking process is not limited to the capacity of the sparestoring section 49 of the memory 40.

[0058] In practical implementation, as mentioned above, by using thedesign of the ring buffer memory, each data set stored in the temporarystorage device 43 that has a consecutive RPBN will be sequentiallyrecorded into the spare storing section 49 of the memory 40. In themeanwhile, each data set sent to the spare storing section 49 issequentially recorded into the corresponding and adjacent spare datablock Bns of the optical disc 42. The above-mentioned operation can beimplemented with a build-in command system. The command system isintegrated with the functions of hardware and software, and utilizes thetemporary storing indices corresponding to the data sets and relatednumbers to accomplish consecutive and continuous data transmissions anddata recording. Actually, a method which is included in the technicalfeatures according to the claimed invention is adopted to record aplurality of checked data sets those have consecutive spare data blocknumbers into the spare storing section 49 in one processing process fromthe step 212 to the step 214, and then record these data sets stored inthe spare storing section 49 into the spare data blocks Bns of theoptical disc 42 in one processing process. Therefore despite the sortingorder of the data sets in the spare storing section having the optimizedsequence for the RPBNs, the seeking processes of the pickup head 36 canbe substantially reduced, however, the amount of the data setscorresponding to defective data blocks Bnd processed in a seekingprocess is limited to the size of the capacity of the spare storingsection 49 of the memory 40.

[0059] The disclosed method and structure for the defect management ofan optical disc according to the present invention can be applied to allkinds of re-writing optical storage media (e.g., an optical diskconforming to a CD-MRW standard, a DVD+MRW standard or other standards)and any corresponding optical storage systems. The structure of theoptical storage system according to the present invention comprises atemporary storage device utilized for temporarily storing a plurality ofchecked data sets corresponding to the defective data blocks inspectedin the main storing section. According to the present invention, thedata sets stored in the temporary storage device are re-arrangedaccording to a sorting process and a sequence of corresponding PRBNs,such that the sequence of the re-arranged data sets after the sortingprocess is the optimized sequence of the RPBNs corresponding to there-arranged data sets. Finally, the re-arranged data sets are recordedinto the spare storing section of the memory and the spare data blocksof the optical disc, such that the amount of recording data sets thatare recorded into the spare data blocks is substantially increased, andthe required seeking processes are reduced. In addition, the mainstoring section and the spare storing section of the memory arerespectively a ring buffer memory according to the present invention.With the addition of a temporary storage device and a sorting processaccording to the present invention, the amount of defective data blocksprocessed in each seeking process is not limited to the capacity of thespare storing section without increasing the cost but yet the efficiencyof data recording is obviously improved.

[0060] Those skilled in the art will readily observe that numerousmodifications and alterations of the device may be made while retainingthe teachings of the invention. Accordingly, the above disclosure shouldbe construed as limited only by the metes and bounds of the appendedclaims.

What is claimed is:
 1. A method for recording a plurality of data setsonto an optical storage medium by utilizing a temporary storage devicein an optical storage system, the optical storage system comprising amemory for storing the plurality of data sets, the optical storagemedium comprising a plurality of data blocks and a plurality of sparedata blocks being installed on the optical storage medium, each datablock being utilized for recording a data set, each spare data blockbeing utilized for substituting for a defective data block to record thedata set corresponding to the defective data block, the methodcomprising: storing a plurality of data sets corresponding to aplurality of defective data blocks in the memory into the temporarystorage device; re-arranging a sequence of the plurality of data setscorresponding to the plurality of defective data blocks in the temporarystorage device according to a sorting process; and recording theplurality of re-arranged data sets in the temporary storage device intothe plurality of spare data blocks of the optical storage medium.
 2. Themethod of claim 1 wherein each data set corresponding to a defectivedata block corresponds to a spare data block number, and each spare datablock number corresponds to a spare data block of the optical storagemedium; the method further comprising: utilizing the sorting process toarrange the plurality of data sets in the temporary storage deviceaccording to a sequence of the plurality of spare data block numbers. 3.The method of claim 2 wherein each relationship between a data setcorresponding to a defective data block and a spare data block number isrecorded in a defect record table of the optical storage medium.
 4. Themethod of claim 2 wherein the memory comprises a main storing sectionand a spare storing section, the main storing section utilized forstoring a plurality of data sets transmitted from a main controller, thespare storing section utilized for storing a plurality of data setscorresponding to a plurality of defective data blocks; the methodfurther comprising: sequentially recording a plurality of data setscorresponding to consecutive spare data block numbers in the temporarystorage device into the spare storing section; and sequentiallyrecording a plurality of data sets corresponding to consecutive sparedata block numbers in the spare storing section into a plurality ofadjacent spare data blocks of the optical storage medium during aseeking process.
 5. The method of claim 4 wherein the main storingsection and the spare storing section of the memory are respectively aring buffer.
 6. The method of claim 4 further comprising: recording apredetermined number of data sets corresponding to consecutive sparedata block numbers in the temporary storage device into the sparestoring section at a time; and recording a predetermined number of datasets corresponding to consecutive spare data block numbers in the sparestoring section into a plurality of adjacent spare data blocks of theoptical storage medium at a time; wherein the predetermined number isdetermined according to a memory capacity of the spare storing section.7. The method of claim 1 wherein the optical storage medium is anoptical disc conforming to a CD-MRW (Compact Disk-Mount RainierReWritable) standard, an optical disk conforming to a DVD (DigitalVersatile Disk)+MRW standard, or other re-writable optical storagemedia.
 8. A method for recording a plurality of data sets onto anoptical storage medium in an optical storage system to reduce seekingprocesses, the optical storage medium being installed with a pluralityof data blocks and a plurality of spare data blocks, each data blockutilized for recording a data set, each spare data block utilized forsubstituting for a defective data block to record a data setcorresponding to the defective data block, the optical storage systemcomprising: a memory comprising a main storing section and a sparestoring section; and a temporary storage device electrically connectedto the memory for temporarily storing data sets; the method comprising:utilizing the main storing section to store the plurality of data sets;storing a predetermined number of data sets corresponding to apredetermined number of defective data blocks in the main storingsection into the temporary storage device, wherein the predeterminednumber is determined according to a memory capacity of the main storingsection; re-arranging a sequence of the predetermined number of datasets in the temporary storage device according to a sorting process;recording the predetermined number of re-arranged data sets in thetemporary storage device into the spare storing section; and recordingthe predetermined number of re-arranged data sets in the spare storingsection into a predetermined number of corresponding spare data blocksof the optical storage medium.
 9. The method of claim 8 wherein eachdata set corresponding to a defective data block corresponds to a sparedata block number, and each spare data block number corresponds to aspare data block of the optical storage medium; the method furthercomprising: utilizing the sorting process to arrange the predeterminednumber of data sets in the temporary storage device according to asequence of the predetermined number of spare data block numbers. 10.The method of claim 9 further comprising: sequentially recording thepredetermined number of data sets in the temporary storage device intothe spare storing section; and sequentially recording a plurality ofdata sets corresponding to consecutive spare data block numbers amongthe predetermined number of data sets into a plurality of adjacent sparedata blocks of the optical storage medium during a seeking process. 11.The method of claim 9 wherein each relationship between a data setcorresponding to a defective data block and a spare data block number isrecorded in a defect record table of the optical storage medium.
 12. Themethod of claim 8 wherein the main storing section and the spare storingsection of the memory are respectively a ring buffer.
 13. The method ofclaim 8 wherein the optical storage medium is an optical disc conformingto a CD-MRW (Compact Disk-Mount Rainier ReWritable) standard, an opticaldisk conforming to a DVD (Digital Versatile Disk)+MRW standard, or otherre-writable optical storage media.
 14. A method for recording aplurality of data sets into a plurality of adjacent spare data blocks ofan optical storage medium during a seeking process, each data setcorresponding to a spare data block number, each spare data block numbercorresponding to a spare data block, the method comprising: (a)arranging the plurality of data sets according to a sequence of theplurality of corresponding spare data block numbers so that theplurality of spare data block numbers of the plurality of arranged datasets become consecutive spare data block numbers; and (b) afterproceeding with step(a), recording the plurality of arranged data setsinto a plurality of adjacent spare data blocks during a seeking process.15. The method of claim 14 wherein the optical storage medium furthercomprises a plurality of data blocks, and each spare data block isutilized for substituting for a defective data block to record a dataset corresponding to the defective data block.
 16. The method of claim14 being applied to an optical storage system, wherein the opticalstorage medium is an optical disc conforming to a CD-MRW (CompactDisk-Mount Rainier ReWritable ) standard, an optical disk conforming toa DVD (Digital Versatile Disk)+MRW standard, or other re-writableoptical storage media.